Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ENTSO-E, Time-of-Use Tariff provider #2207

Merged
merged 20 commits into from
Aug 25, 2023
Merged

Conversation

sfeilmeier
Copy link
Contributor

This implementation uses the ENTSO-E transparency platform to receive day-ahead prices in European power grids.

See https://newtransparency.entsoe.eu/dv/market/price/dayAhead/PT60M

To request a (free) authentication token, please see chapter "2. Authentication and Authorisation" in the official API documentation: https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation

@github-actions
Copy link

Code Coverage

@github-actions
Copy link

Code Coverage

@github-actions
Copy link

Code Coverage

@venu-sagar venu-sagar requested a review from pooran-c July 31, 2023 09:41
@venu-sagar venu-sagar marked this pull request as ready for review July 31, 2023 09:41
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Code Coverage

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Code Coverage

Copy link
Contributor

@pooran-c pooran-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed.

Copy link
Contributor Author

@sfeilmeier sfeilmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first review

Added Dummy Component.
Added Currency config.
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Code Coverage

@sfeilmeier
Copy link
Contributor Author

@venu-sagar Should I review again already? Or will you announce me?

@venu-sagar
Copy link
Contributor

@venu-sagar Should I review again already? Or will you announce me?

I will announce you.

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Code Coverage

1 similar comment
@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Code Coverage

@venu-sagar
Copy link
Contributor

@venu-sagar Should I review again already? Or will you announce me?

@sfeilmeier You can review it now.

Copy link
Contributor Author

@sfeilmeier sfeilmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments.

Unfortunately I am way to much involved again in coding style and coding details. Please have somebody else review it next time before asking for a final review. Thanks!

io.openems.edge.timeofusetariff.entsoe/readme.adoc Outdated Show resolved Hide resolved
*
* @param updateCurrency The callback {@link Consumer}.
*/
private void subscribe(Consumer<Currency> updateCurrency) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this subscribe and unsubscribe is ok now, but it's still quite over engineered.

It would be sufficient to keep a private final variable:

private final Consumer<Currency> updateCurrency = currency -> {
			this.currency = currency;
			this.executor.schedule(this.task, 0, TimeUnit.SECONDS);
		};

then subscribe during activate() (or setMeta()) and unsubscribe during deactivate() (or unsetMeta()). No need to keep a List of subscribes when you know you have only one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got my comment wrong. With setMeta() I referred to using "Method Injection" (see OSGi compendium 112.3.2 Method Injection https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-method.injection)

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

Code Coverage

@venu-sagar venu-sagar changed the title Implement ENTSO-e as Time-of-Use Tariff provider Implement ENTSO-E, Time-of-Use Tariff provider Aug 10, 2023
& some small improvements
Copy link
Contributor Author

@sfeilmeier sfeilmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments and implemented directly: dd37ceb

Please test again; afterwards from my side we are ready to merge

@@ -2,9 +2,9 @@

This implementation uses the ENTSO-E transparency platform to receive day-ahead prices in European power grids.

To request a (free) authentication token, please see chapter "2. Authentication and Authorisation" in the official API documentation: https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation
To request a (free) authentication token, please see chapter "2. Authentication and Authorization" in the official API documentation: https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the document it is actually written in British English "Authorisation" and not "Authorisation"

*
* @param updateCurrency The callback {@link Consumer}.
*/
private void subscribe(Consumer<Currency> updateCurrency) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got my comment wrong. With setMeta() I referred to using "Method Injection" (see OSGi compendium 112.3.2 Method Injection https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-method.injection)

@github-actions
Copy link

Code Coverage

@venu-sagar
Copy link
Contributor

I left a few comments and implemented directly: dd37ceb

Please test again; afterwards from my side we are ready to merge

I have tested it. Working as expected.

@sfeilmeier sfeilmeier merged commit 63c0ce6 into develop Aug 25, 2023
3 checks passed
@sfeilmeier sfeilmeier deleted the feature/tou-entsoe branch August 25, 2023 13:03
@sfeilmeier
Copy link
Contributor Author

Well done. Thank you @venu-sagar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants